package com.disapand.strongarmy.configuration

import org.springframework.beans.factory.annotation.*
import org.springframework.context.annotation.*
import org.springframework.web.servlet.config.annotation.*

/**
 *
 * @auth disapand
 * @date 2021/12/13 - 22:37 - 星期一
 *
 */
@Configuration
class WebConfig : WebMvcConfigurer {

    @Value("\${file-save-path}")
    lateinit var fileSavePath: String

    override fun addResourceHandlers(registry: ResourceHandlerRegistry) {
        registry.addResourceHandler("/images/**")
            .addResourceLocations("file:$fileSavePath/images/")
    }
}